Re-creates the DataGrid control properties and columns. Doesn't support named arguments.
Syntax
object.Rebind
Remarks
The Rebind method causes the DataGrid control to perform the same operations that occur when you set the DataSource property. The DataGrid control resets the columns, headings and other properties based on the current Data control properties.
If you have not modified the grid columns at design time, then executing the ReBind method will reset the columns, headings, and other properties based on the current data source.
However, if you have altered the columns in any way at design time (even if you leave the DataField properties blank), then the grid will assume that you wish to maintain the modified grid layout and will not automatically reset the columns.
For an unbound grid (one with its DataMode property set to 1), this method is similar to the Refresh method except that the grid attempts to restore the current and topmost rows.
Note To force the grid to reset the column bindings even if the columns were modified at design time, invoke the ClearFields method immediately before ReBind. Conversely, to cancel the grid's automatic layout response and force the grid to use the current column/field layout, invoke the HoldFields method immediately before ReBind.